package com.dc.ai.tools;

import com.dc.ai.entity.po.*;
import com.dc.ai.entity.query.DeviceQuery;
import com.dc.ai.entity.query.OrderQuery;
import com.dc.ai.service.*;
import lombok.RequiredArgsConstructor;
import org.springframework.ai.tool.annotation.Tool;
import org.springframework.ai.tool.annotation.ToolParam;
import org.springframework.stereotype.Component;

import java.util.List;

@RequiredArgsConstructor
@Component
public class AppTools {

    private final SysUserService userService;

    private final ToolService toolService;

    private final ProductService productService;

    /*
    @Tool(description = "根据条件查询当前用户的订单")
    public List<Order> queryOrder(@ToolParam(description = "查询的条件", required = false) OrderQuery query) {
        return toolService.queryOrder(query);
    }


    @Tool(description = "根据条件查询当前用户的设备")
    public List<Device> queryDevice(@ToolParam(description = "查询的条件", required = false) DeviceQuery query) {
        return toolService.queryDevice(query);
    }

    @Tool(description = "生成预约单，返回预约单号")
    public Long createCourseReservation(
            @ToolParam(description = "用户姓名") String userName,
            @ToolParam(description = "联系电话") String contactInfo,
            @ToolParam(description = "备注", required = false) String remark) {
        return toolService.createCourseReservation(userName, contactInfo, remark);
    }*/

    @Tool(description = "根据商品ID查询商品信息")
    public Product getProductById(@ToolParam(description = "商品ID") Long productId) {
        return productService.getProductById(productId);
    }

}
